<template>
  <div class="about">
    <h1>This is another about page</h1>
    <h2>{{content}}</h2>
    <Functional :content="content" />
  </div>
</template>
<script lang="ts">
import Functional from "@/components/Functional.vue";
export default {
  data: () => ({
    content: "functional"
  }),
  components: { Functional },
  created() {
    // console.log(this.$route.params);
    // console.log(this.$Progress);
    // console.log(this.$route);
  },

  methods: {
    updateUserInfo() {
      // let info = Storage.getItem("userInfo");
      // if (info && info.isUpdate) {
      //   console.log("更新用户信息");
      //   //todo
      // }
      console.log("更新用户信息");
    }
  },
  // mounted() {
  //   this.updateUserInfo()
  // },
  // activated() {
  //   this.updateUserInfo()
  // }

  beforeRouteEnter(to, from, next) {
    next(vm => {
      vm.updateUserInfo();
    });
  }
};
</script>
